package com.wind.cloud.demo.feign;

import com.wind.cloud.demo.feign.factory.HelloFeignServiceFactory;
import com.wind.cloud.demo.vo.ParamVo;
import com.wind.cloud.demo.vo.ResultVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 测试Feign
 */
@FeignClient(value = "wind-demo-provider", fallbackFactory = HelloFeignServiceFactory.class)
public interface HelloFeignService {

    /**
     * 测试
     *
     * @param param
     * @return
     */
    @GetMapping(value = "/hello")
    String hello(@RequestParam(name = "param") String param);

    @PostMapping(value = "/helloPost")
    ResultVo hello(ParamVo param);

}
